<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>企业用户注册</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<link rel="stylesheet" type="text/css" href="<c:url value="/css/bootstrap.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/footer.css"/>">
	<script type="text/javascript" src="<c:url value="/js/jquery.min.js"/>"></script>
	<script type="text/javascript" src="<c:url value="/js/bootstrap.js"/>"></script>
	
	<script type="text/javascript">
		function checkdata(){
			var pwd = $('#pwd').val();
        	var pwdconf = $('#pwdconf').val();
        	if(pwd != pwdconf){
        		document.getElementById("error").innerHTML="两次密码输入不一致";
        		document.getElementById("pwdconf").value="";
        		return false;
        	}			
			return true;
		}
	</script>

  </head>
  
  <body>
  	<div style="background:url(images/register_bg2.png)">
  	<div class="container" style="width:40%;background:url(images/register_bgcolor.jpg)">
	    <form:form modelAttribute="hrModel" method="post" class="form-horizontal" onsubmit="return checkdata()">    	
	    	<%--<h3 class="form-signin-heading" align="center">邮箱注册</h3>--%>
	    	<br><br><br><br>
	    	<div class="form-group">
			    <label class="col-sm-3 control-label">登陆名</label>
			    <div class="col-sm-7">
			      <input type="text" name="loginName" class="form-control" placeholder="请输入登陆名" required autofocus>
			    	<span style="color:red"><form:errors path="name"></form:errors></span>
			    </div>
			</div>
	    	<div class="form-group">
			    <label class="col-sm-3 control-label">姓名</label>
			    <div class="col-sm-7">
			      <input type="text" name="name" class="form-control" placeholder="请输入姓名" required autofocus>
			    	<span style="color:red"><form:errors path="name"></form:errors></span>
			    </div>
			</div>
			<div class="form-group">
			    <label class="col-sm-3 control-label">密码</label>
			    <div class="col-sm-7">
			      <input type="password" id="pwd" name="password" class="form-control" placeholder="请输入密码" required>
			    	<span style="color:red"><form:errors path="password"></form:errors></span>
			    </div>
			</div>
			<div class="form-group">
			    <label class="col-sm-3 control-label">确认密码</label>
			    <div class="col-sm-7">
			      <input type="password" id="pwdconf" class="form-control" placeholder="再次输入密码" required>
			    </div>
			</div>
			<div class="form-group">
			    <label class="col-sm-3 control-label">邮箱</label>
			    <div class="col-sm-7">
			      <input type="email" name="mailbox" class="form-control" placeholder="请输入邮箱" required>
			    	<span style="color:red"><form:errors path="mailbox"></form:errors></span>
			    </div>
			</div>
			<div class="form-group">
			    <label class="col-sm-3 control-label">电话</label>
			    <div class="col-sm-7">
			      <input type="text" name="phone" class="form-control" placeholder="请输入电话" required>
			    	<span style="color:red"><form:errors path="phone"></form:errors></span>
			    </div>
			</div>
			<div class="form-group">
			    <label class="col-sm-3 control-label">验证码</label>
			    <div class="col-sm-5">
			      <input type="text" name="checkcode" class="form-control" placeholder="请输入验证码" required>
			    	<span style="color:red"><form:errors path="checkcode"></form:errors></span>
			    </div>
			    <div class="col-sm-3">
			      <img src="<c:url value="/jsp/checkCodeImage.jsp"/>" title="验证码,看不清楚?请点击刷新验证码" 
							onClick="this.src='<c:url value="/jsp/checkCodeImage.jsp"/>?t='+(new Date().getTime());">						
			    </div>
			</div>
			
			<div class="form-group">
			    <div class="col-sm-offset-3 col-sm-10">
			      <font color="red"><span id="error"></span></font>
			    </div>
			</div>
	    	<div class="form-group">
			    <div class="col-sm-offset-2 col-sm-8">
			      <button class="btn btn-lg btn-primary btn-block" type="submit">注册</button>
			    </div>
			</div> 	             
	    </form:form>
	    <br><br><br>
    </div>
    </div>
    <%@include file="../common/footer.jsp" %>
  </body>
</html>